package com.zhihuichongcheng.application.ui.task.adapter.holder;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.smartlib.cmnObject.util.DateUtil;
import com.zhihuichongcheng.application.R;
import com.zhihuichongcheng.application.base.BaseActivity;
import com.zhihuichongcheng.application.bean.task.TaskCommentBean;

/**
 * task log Created by LK on 2017/1/9.
 */
public class TaskLogHolder extends BaseHolder {
    private ImageView icon;
    private TextView mTvContent, mTvTime;

    public TaskLogHolder(View itemView, BaseActivity activity) {
        super(itemView, activity);
        icon = (ImageView) itemView.findViewById(R.id.icon);
        mTvContent = (TextView) itemView.findViewById(R.id.comment_content);
        mTvTime = (TextView) itemView.findViewById(R.id.comment_time);
    }

    public void setData(TaskCommentBean commentBean) {
        mTvContent.setText(commentBean.getContent());
        mTvTime.setText(DateUtil.showDate(commentBean.getCreateTime()));
    }
}
